public class SurfPackage implements SurfPackageInterface /*extends Package*/ {
    int surfData=2000;
    int monthCost=20;


    public SurfPackage() {
    }

    public SurfPackage(int surfData, int monthCost) {
        this.surfData = surfData;
        this.monthCost = monthCost;
    }


    public void show() {
        System.out.printf("上网流量："+surfData+"M%n每月资费："+monthCost+"元%n");
    }

    @Override
    public void surfInfo(int surfdata, SimCard simcard) {
        simcard.setSurfData(surfdata);
        simcard.setUsername("murphy");
        simcard.setNumber(10010);
        System.out.printf("用户："+simcard.getUsername()+"%n手机号："+simcard.getNumber()
            +"%n上网流量是："+simcard.getSurfData()+"%n");
    }
}
